<?php

use think\migration\Migrator;
use think\migration\db\Column;

class BasicSourceListData extends Migrator
{
    /**
     * 源清单基础数据
     */
    public function change()
    {
        $table = $this->table('basic_source_list_data');
        $table
            //step:名称
            ->addColumn('company_id', 'integer', ['limit' => 10, 'comment' => '公司ID'])
            ->addColumn('flue_gas', 'string', ['limit' => 50, 'comment' => '烟气流量'])
            ->addColumn('bc', 'string', ['limit' => 50, 'comment' => 'BC'])
            ->addColumn('co', 'string', ['limit' => 50, 'comment' => 'CO'])
            ->addColumn('nox', 'string', ['limit' => 50, 'comment' => 'NOX'])
            ->addColumn('oc', 'string', ['limit' => 50, 'comment' => 'OC'])
            ->addColumn('pm10', 'string', ['limit' => 50, 'comment' => 'PM10'])
            ->addColumn('pm25', 'string', ['limit' => 50, 'comment' => 'PM2.5'])
            ->addColumn('so2', 'string', ['limit' => 50, 'comment' => 'so2'])
            ->addColumn('voc', 'string', ['limit' => 50, 'comment' => 'VOC'])
            ->addColumn('co2', 'string', ['limit' => 50, 'comment' => 'CO2'])
            ->addColumn('nh3', 'string', ['limit' => 50, 'comment' => 'NH3'])
            ->addColumn('tsp', 'string', ['limit' => 50, 'comment' => 'TSP'])

            ->setComment('基本数据 - 源清单基础数据')
            //引擎
            ->setEngine('InnoDB')
            ->save();
    }
}
